home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_46188.txt < prev    next >
Text File  |  1991-04-30  |  2KB  |  50 lines

  1. -- card: 46188 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: ZipCheck
  6.  
  7.  
  8. -- part contents for background part 10
  9. ----- text -----
  10. 55
  11.  
  12. -- part contents for background part 27
  13. ----- text -----
  14. XFCN
  15.  
  16. -- part contents for background part 5
  17. ----- text -----
  18. ZipCheck
  19.  
  20. -- part contents for background part 6
  21. ----- text -----
  22. zipCheck checks a zipcode against a list of the 895 valid 3-digit zip areas in the 50 states (as of 1/88) and returns the correct state abbreviation for the target area.
  23.  
  24.  ┬⌐ Copyright 1988 by Sam Thornton
  25. May be copied & distributed without charge only, except for nominal copying and distribution costs. Not for commercial sale or resale.         
  26.                                             
  27. Written in LightSpeed C 3.0, 9/6/88 - some portions ┬⌐ by Symantec and Apple.
  28. For a copy of the C source code, send a blank disk and $1 for postage & handling to:
  29.      Sam Thornton
  30.      PO Box 123
  31.      Fairfield, NE 68938
  32.  
  33. ΓÇóΓÇóSam has helped the continuing production of the Developer Stack by sending in this contribution.  Thanks, Sam!
  34. [Editor]
  35.  
  36.  
  37. -- part contents for background part 7
  38. ----- text -----
  39. Syntax:
  40.  
  41. get zipCheck(<"zipcode">)
  42.  
  43. get zipCheck(<field "fieldname">)
  44.  
  45. The return is the correct state abbreviation for the entered zipcode or, in the case of an error, an empty string.
  46.  
  47. The zipcode's format must be either 5 TEXT characters (e.g., "68938"), or 10 TEXT characters (e.g., "68938-0123").
  48.  
  49. If there is either a format error in the entered zipcode, or if there is no corresponding 3-digit zip area, zipCheck beeps and returns a null string instead of a state abbreviation.
  50.